<template>
  <div>
    <h2>首页</h2>
    <div>
      <router-link to="/food">美食</router-link>
      <br />
      <router-link to="/#">水果</router-link>
      <router-link to="/#">超市</router-link>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "home",
  computed: {
    ...mapState({
      n: state => state.n,
      // countAlias: "n"
    })
  },
  created() {
    console.log(this.n);
  }
};
</script>
